<?php
/**
 * @copyright   FOSP
 * @version     20120327
 * @todo        factory to object access statictis table
 * @name        Fpt_Business_Statictis
 * @author      QuangTM 
 */
class Fpt_Business_Statictis{

    protected function __construct()
    {
        
    }
    
    protected function __clone()
    {
        
    }

    /**
     * Get object to access statictis table
     * @param array $options
     * @return Fpt_Business_Statictis_Adapter_Abstract
     * @author QuangTM 
     */
    static public function factory($options)
    {
        $className = $options['adapter'];
        if (empty($className))
        {
            return Fpt_Server::setOutputData(-1, 'empty class name', null);
        }
        $className = __CLASS__ . '_Adapter_' . ucfirst(strtolower($className));

        return call_user_func(array($className, 'getInstance'));
    }
}